When shrinking a zero polynomial, avoid trying to set its degree
to a negative value, and just keep it at 0, which is the minimal
degree we support.
Note that this also happens for polynomials whose coefficients are
all NaN, as is the case in bug 788093, so they also become zero
polynomials after shrinking, incidentally.
break;
}
- if (i > 0)
+ if (i == poly->degree + 1)
+ {
+ babl_polynomial_reset (poly, poly->scale);
+ }
+ else if (i > 0)
{
memmove (poly->coeff, &poly->coeff[i],
(poly->degree - i + 1) * sizeof (double));